package com.itheima.controller.user;

import com.itheima.common.result.Result;
import com.itheima.dto.UserLoginDTO;
import com.itheima.pojo.YddUser;
import com.itheima.service.YddUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController()
@RequestMapping("home")
public class HomeController {
    @Autowired
    YddUserService yddUserService;

    @PostMapping("index/login")
    public Result login(@RequestBody YddUser user){
        return yddUserService.login(user);
    }

}
